﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ExportToPLMX.Managers.CApExportToPlmxSceneManager
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using DnProcessSimulateCommands.ExportData;
using EngineeringInternalExtension;
using System.Collections.Generic;


namespace DnProcessSimulateCommands.ExportToPLMX.Managers;

public class CApExportToPlmxSceneManager(string exportFullPath) : CApExportToPlmxExportManager(exportFullPath)
{
  public List<string> ExportedObjectsIds = new List<string>();

  public int ExportedObjectsCount => this.ExportedObjectsIds.Count;

  internal void ExportScene(string simulationFileFullPath, int lod)
  {
    CApSceneDataExporterViewModel toBinaryViewModel = this.CreateExportToBinaryViewModel(simulationFileFullPath);
    toBinaryViewModel.SelectedLOD = lod;
    new CApSceneDataExporter(toBinaryViewModel).Launch(out this.ExportedObjectsIds);
  }

  private CApSceneDataExporterViewModel CreateExportToBinaryViewModel(string simulationFileFullPath)
  {
    return new CApSceneDataExporterViewModel()
    {
      SceneDataFileFullPath = this.ExportPath,
      SimulationFileFullPath = simulationFileFullPath,
      ExportSimulation = true,
      CompressExportData = false,
      ExportInfo = new TxExportGraphicsAnimationData(),
      SelectedLOD = 0,
      ExportFileFormat = (TxExportGraphicsAnimationFileFormatEx) 4,
      UseVerticesAbsoluteLocation = false
    };
  }
}
